<template>

      <tr>
          <td>合计:{{sum}}</td>
          <td colspan="5">

          </td>
        </tr>

</template>

<script>
export default {

  props: ['arr'],
  computed: {
    sum () {
      const newArr = this.arr.filter(item => item.checked === true)
      return newArr.reduce((sum, item) => (sum += item.price * item.num), 0)
    }
  }
}
</script>

<style>

</style>
